import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { WarehousableComponent } from './pages/warehous-table/warehous-table.component';
import { GoodsDetailComponent } from './pages/basisinfo-detail/basisinfo-detail.component';
import { GoodstwoDetailComponent } from './pages/basisinfotwo-detail/basisinfotwo-detail.component';
import { UserDetailComponent } from './pages/user-detail/user-detail.component';
const routes: Routes = [
    {
        path: 'warehous',
        component: WarehousableComponent,
        data: { breadcrumbs: [{ title: '仓库信息' }] },
        children: [
            {
                path: 'detail/:id',
                component: GoodsDetailComponent,
                data: { breadcrumbs: [{ title: '仓库信息', path: '/warehous/warehous' }, { title: '仓库详情' }] }
            },
            {
                path: 'detail',
                component: GoodsDetailComponent,
                data: { breadcrumbs: [{ title: '仓库信息', path: '/warehous/warehous' }, { title: '添加仓库' }] }
            },
            {
                path: 'add/:id',
                component: GoodstwoDetailComponent,
                data: { breadcrumbs: [{ title: '仓库信息', path: '/basisinfo/info' }, { title: '库区详情' }] }
            },
            {
                path: 'add',
                component: GoodstwoDetailComponent,
                data: { breadcrumbs: [{ title: '仓库信息', path: '/basisinfo/info' }, { title: '添加库区' }] }
            },
            {
                path: 'user/:id',
                component: UserDetailComponent,
                data: { breadcrumbs: [{ title: '仓库信息', path: '/basisinfo/info' }, { title: '库位详情' }] }
            },
            {
                path: 'user',
                component: UserDetailComponent,
                data: { breadcrumbs: [{ title: '仓库信息', path: '/basisinfo/info' }, { title: '添加库位' }] }
            }
        ]
    },
];

export const declarationComponents = [
    WarehousableComponent,
    GoodsDetailComponent,
    GoodstwoDetailComponent,
    UserDetailComponent
];

export const entryComponents = [
];

@NgModule({
    imports: [
        RouterModule.forChild(routes)
    ],
    exports: [
        RouterModule
    ]
})
export class WarehousRoutingModule { }
